/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.meluk.billboard.jpa;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 * @author AMelnyk
 */
@Entity
public class StatisticPlayer implements Serializable{

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    @ManyToOne
    @JoinColumn(name = "PLAYER_ID")
    private User player;
    @OneToMany(mappedBy = "statisticPlayer")
    private List<StatisticWithPlayer> statisticWithPlayerList = new ArrayList<StatisticWithPlayer>();
    @OneToOne(mappedBy = "statisticPlayer")
    private StatisticWithComputer statisticWithComputer;
    @Enumerated(EnumType.STRING)
    private GameType gameType;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public User getPlayer() {
        return player;
    }

    public void setPlayer(User player) {
        this.player = player;
    }

    public List<StatisticWithPlayer> getStatisticWithPlayerList() {
        return statisticWithPlayerList;
    }

    public void setStatisticWithPlayerList(List<StatisticWithPlayer> statisticWithPlayerList) {
        this.statisticWithPlayerList = statisticWithPlayerList;
    }

    public StatisticWithComputer getStatisticWithComputer() {
        return statisticWithComputer;
    }

    public void setStatisticWithComputer(StatisticWithComputer statisticWithComputer) {
        this.statisticWithComputer = statisticWithComputer;
    }

    public GameType getGameType() {
        return gameType;
    }

    public void setGameType(GameType gameType) {
        this.gameType = gameType;
    }

    
}
